Post

Replies

Boosts

Views

Activity

Reply to NSFileSandboxingRequestRelatedItemExtension: Failed to issue extension
Hello Kevin, hello All I have tested your suggestions. Sadly to no avail. The location of the files is not crucial nor using a signed version of the app. I have also setup a new project on my macOS14 Mac with the same result. So it is not a macOS26 problem neither. That makes me wonder more and more. My AppStore app (bcAnalyze) that does use the related file feature with these files works well on any macOS with these files. The code I am using is older dating back ca. 10 years (originated in Obj-C days and is now Swift since ca. 4 years). The idea of adding a security scoped bookmark to the sidecar file is tempting, but wouldn't help since the original application producing the the sidecar file is more than 10 years old and users may have already millions of file pairs. There shouldn't be a difference between SwiftUi and AppKit as front-end, but I may also try this in the next days. Since my AppStore app works, I must oversee something little that has this big effect. I can't otherwise explain the negative result. I have setup a super simple Git project here: https://github.com/vrunkel/RelatedFileTest Background of these files / apps is: I am producing an automated bat detector since 2007. Since then a Mac app exists (now in its fourth major revision) that implements a bat call finder and saves results for each audio file in a so called bcCalls file containing a plist representation of call measurements. The app exists still outside the AppStore (signed and notarized) and I have roughly 1000 users. They record up to a couple of millions bat call recordings a year each. When opening a folder and using the security scoped bookmark on the folder, I can load files. Since my app idea will be a document based app, that is not the perfect solution. Thanks for any further pointers/ideas. Have a nice week, Volker
Topic: App & System Services SubTopic: Core OS Tags:
2d
Reply to NSFileSandboxingRequestRelatedItemExtension: Failed to issue extension
Hello Kevin, thx for coming here! Let me clarify: I can only access the user selected file. The sidecar file can not be accessed, due to not getting a FilePresenter (Sandbox tells failed to issue an extension for file) The files both user selected and sidecar reside in a folder inside my users document folder and I try to read the sidecar when the user opens the audio file. I can access the sidecar file from terminal and load its content. I can also load its content when opening it with a second NSOpenPanel(). So access rights are okay. Using one of my Apps from the AppStore which implements the same file access works as well. So currently I am lost why my fresh code on the fresh installed machine is not working. TIA, Volker
Topic: App & System Services SubTopic: Core OS Tags:
6d
Reply to USB microphone with high samplerate and AVAudioEngine
The reply from Engineer got me on the track for macOS. It seems even so the input device is correctly selected in system preferences and is returned as current input device, the AVAudioEngine inputNode uses a different device id. Now when manually setting the inputNode AUAudioUnit id to the wanted input device ( code taken from a reply here: https://forums.developer.apple.com/forums/thread/71008 ), i can tap the USB microphone and analyse its input data. So while the above reply does not solve the question, it gave the right hint and put me on track quickly.
Topic: Media Technologies SubTopic: Audio Tags:
May ’24
Reply to Swift/Collection.swift:722: Fatal error: Index out of bounds
Thx! I get the string entered in a search field (created using .searchable() ) Upon submission of the search (by pressing enter) I call a function: private func searchPredicate(query: String) { if self.searchControl.originalPredicate == nil { self.searchControl.originalPredicate = items.nsPredicate if items.nsPredicate == nil { self.searchControl.originalPredicate = NSPredicate(format: "TRUEPREDICATE") } } var predicate: NSPredicate? if self.searchScope == .title { predicate = NSPredicate(format: "%K CONTAINS[cd] %@", #keyPath(Article.title), self.searchText) } else if searchScope == .authors { predicate = NSPredicate(format: "%K CONTAINS[cd] %@", #keyPath(Article.authorsForDisplay), self.searchText) } DispatchQueue.main.async { self.items.nsPredicate = NSCompoundPredicate(andPredicateWithSubpredicates: [self.searchControl.originalPredicate ?? NSPredicate(format: "TRUEPREDICATE"), predicate!]) } } When calling this line: self.items.nsPredicate = NSCompoundPredicate(andPredicateWithSubpredicates: [self.searchControl.originalPredicate ?? NSPredicate(format: "TRUEPREDICATE"), predicate!]) The crash will occur - or as often - not. This works for most search string. Only some strings repeatedly cause the mentions crash. for example if I enter wasser it crashes. If I enter bat or evident or turbine or curtail or... it doesn't. All valid and normal strings. Searches with zero results work as well, so entering xcojfoesjif will not give a crash. So far I can reproduce the crash using washer or human - I have not tried more words yet. When I look at the call stack, it happens within private functions handling the Table display. There is no refresh code for the table since the the following fetch request is used - and it does automatically pre-render the view (as a @State would do): @FetchRequest( entity: Article.entity(), sortDescriptors: [NSSortDescriptor(keyPath: \Article.year, ascending: false)], predicate: NSPredicate(format: "TRUEPREDICATE"), animation: .default) private var items: FetchedResults<Article> I do not have a single line where I rely on an index for the data array. All done magically by SwiftUI. Otherwise it would be easy to solve ;) The code is on Github: https://github.com/vrunkel/Peru I can also supply my test data which needs to be imported from xml first. To me it looks like a bug in SwiftUI's table implementation. Since the call stack contains _delegate_isGroupRow: before the crash, I wonder if for some reason the table wants to create sections? I don' have sections as seen in the code sample above regarding table display. Hope that clarifies!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’23